#include<bits/stdc++.h>
#define int long long
#define endl "\n"

using namespace std;

bool check(int y) {
	int a = y / 100;
	int b = y % 100;
	if((a + b) * (a + b) != y) {
		return false;
	}
	int t = 0;
	for(int i = 1; ; i ++ ) {
		t += pow(i, 3);
		if(t == y) {
			return true;
		} else if(t > y ) {
			return false;
		}
	}
}
signed main() {
	for(int i = 2025 + 1;i <= 9999; i ++ ) {
		if(check(i)) {
			cout << i << endl;
		}
	}
	return 0;
}

